﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SubForumPage.aspx.cs" Inherits="WebForum.ForumPages.SubForumPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    </p>
    
    <h1><strong style="font-weight: 700; color: #333333">Forum: <% =this.details[2]%> --> SubForum: <% =this.details[0]%></strong> </h1>
    <h3>Moderators: <% =this.details[1]%></h3>
    <p>&nbsp;</p>
    
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="ObjectDataSource1" BackColor="White" BorderColor="#999999" 
            BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" 
            Width="350px" Height="158px" 
            onselectedindexchanged="GridView1_SelectedIndexChanged">
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="ForumID, SubForumID, ID" 
                    DataNavigateUrlFormatString="~/ForumPages/ThreadPage.aspx/?ForumID={0}&SubForumID={1}&ThreadID={2}" 
                    Text="Enter" ItemStyle-Width="20%"/>
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#0000A9" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#000065" />
        </asp:GridView>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            onselecting="ObjectDataSource1_Selecting" SelectMethod="GetSubForumData" 
            TypeName="DataAccessLayer.SubForumDataLayer">
            <SelectParameters>
                <asp:Parameter Name="forumID" Type="Int32" />
                <asp:Parameter Name="subForumID" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </p>
    <hr/>
    <p>
    <h2>Create Thread</h2>
    <asp:Label ID="Label4" runat="server" Text="Title:  "></asp:Label>
    <p>
        <asp:TextBox ID="TextBox3" runat="server" Width="312px"></asp:TextBox>
    </p>
    <p>
        <asp:Label ID="Label5" runat="server" Text="Body:"></asp:Label>
    </p>
    <p>
        <asp:TextBox ID="TextBox4" runat="server" Height="66px" Width="583px" 
            TextMode="MultiLine"></asp:TextBox>
    <asp:Button ID="Button3" runat="server" Text="Post Thread" 
            Style="; margin-left: 100px; margin-top: 0px;" Height="41px" 
            onclick="Button3_Click"/>
        <asp:Label ID="Label6" runat="server"></asp:Label>
    </p>
</asp:Content>
